//
//  WBDemoViewController.swift
//  MyWeiBo
//
//  Created by 俞存旭 on 16/9/27.
//  Copyright © 2016年 俞存旭. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        title = "第\(navigationController?.childViewControllers.count)"
    }
    //监听方法
    func showNext() {
        
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
        
        
    }

}

extension WBDemoViewController {
    
    //重写父类方法

    override func setupTableView() {
        super.setupTableView()
        //重构 UIBarButtonItem
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))

    }
    
}
